package com.hex.ds.hdtp.core.inf.metadata.converter;

import com.hex.ds.hdtp.core.inf.metadata.entity.TableFieldsEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.Map;

/**
 * @Description: imala sql的结果转对象
 * @Package: com.hex.hdc.service.source.imala.mapper
 * @ClassName: IImpalaListBeanMapper
 *
 * @Author: xiaoma
 * @Date: 2022/5/23 14:24
 * @Version: v1.0
 **/
@Mapper(componentModel = "spring")
public interface IImpalaSqlResultMapper {

    @Mapping(source = "name", target = "columnName")
    @Mapping(source = "comment", target = "columnCommet")
    /** impala的sql结果转字段对象 */
    TableFieldsEntity toTableFieldsBean(Map<String, String> sqlResult);

}
